import React from 'react'
import { createHashRouter, Navigate } from "react-router-dom";
// import Editor from "@/pages/editor";

const routes = [
  {
    path: "/",
    lazy: async () => ({
      Component: (await import("@/layouts/basicLayout")).default,
    }),
    children: [
      {
        index: true,
        element: <Navigate replace to="/adm/micro-editor" />,
      },
      {
        path: "/adm/micro-editor",
        lazy: async () => ({
          Component: (await import("@/pages/editor")).default,
        }),
        // element: <Editor />,
      },
      {
        path: "*",
        element: <div>404</div>,
      }
    ],
  },
];

export const router = createHashRouter(routes);
